Skip to main content
U.S. flag
Health and Human Services Logo

An official website of the Department of Health & Human Services

menu-iconMore mobile-close-icon
mobile-back-btn-icon Back
  • menu-iconMenu
  • mobile-search-icon
AHRQ: Agency for Healthcare Research and Quality
  • Search All AHRQ Sites
  • Careers
  • Contact Us
  • Español
  • FAQs
  • Email Updates
MEPS Home Medical Expenditure Panel Survey
Font Size:
Contact MEPS FAQ Site Map  
S
M
L
XL
 

Linkage File for 2019 MEPS and 2017/2018 NHIS Public Use Files


1.0Overview

The Medical Expenditure Panel Survey (MEPS) Household Component (HC) survey uses the National Health Interview Survey (NHIS) as its sampling frame. Each year a new MEPS-HC panel is established, drawing from the previous year’s NHIS sample. The MEPS-HC collects data through an overlapping panel design. In this design, two calendar years of information are collected from each household through in-person interviews, conducted over five rounds, with Round 3 spanning both calendar years.

The MEPS full-year public use files (PUFs) cover the calendar year of the data year and contain data from Rounds 3, 4, and 5 of the MEPS first panel (which uses the NHIS prior data year 1 as its sampling frame) combined with data from Rounds 1, 2, and 3 of the MEPS second panel (which uses the NHIS prior data year 2 as its sampling frame). As illustrated in Figure 1 below, for full calendar year 2019 estimates, Rounds 3, 4, and 5 of Panel 23 (which uses the 2017 NHIS as its sampling frame) are combined with Rounds 1, 2, and 3 of Panel 24 (which uses the 2018 NHIS as its sampling frame).

Figure 1. Mapping of MEPS Year, Panels, and Rounds to NHIS Years

This image illustrates that 2019 data was collected in Rounds 3, 4, and 5 of Panel 23, and Rounds 1, 2, and 3 of Panel 24

PUFs containing NHIS data for a given calendar year are available from the National Center for Health Statistics (NCHS).

Users who need to augment the MEPS data with information from NHIS can do so with the linkage file described in the following sections.


2.0Linkage File Description

The MEPS and NHIS linkage file, NHMEP19X.DAT, allows the data user to merge any of the person-level 2019 MEPS full-year public use data files with the 2017 and 2018 NHIS person-level PUFs (Person, Sample Adult, and Sample Child).

The NHIS person identifiers have been changed since 2004. Prior to 2004, one household equaled one "case," and unique person identifiers were Household Serial Number (HHX) and Person Number (PX). Since 2004, each family (FMX) has been considered a separate case, and unique person identifiers have been Household Serial Number (HHX), Family Sequence Number (FMX), and Person Sequence Number (FPX).

The linkage file contains 28,512 person-level records and seven variables. In the linkage file, a record exists for each of the MEPS 2019 full-year persons. Each record contains the MEPS sample person ID (DUPERSID) and the corresponding NHIS sample person IDs (HHX, FMX, and FPX). The linkage file can be linked to any of the person-level MEPS 2019 full-year public use data files using the variable DUPERSID. The linkage file can be linked to the NHIS 2017 or 2018 person-level data files by HHX, FMX, FPX, and SRVY_YR.

When a MEPS sample person does not link to NHIS, HHX is set to 999999, FMX is set to 99, PX is set to 99, FPX is set to 99, SRVY_YR is set to 9999, and LINKFLAG is set to 0.


3.0Linkage File Record Counts

Of the 14,423 MEPS Panel 23 persons, 13,191 persons link to the 2017 NHIS data, while 13,207 of the 14,089 Panel 24 persons link to the 2018 NHIS data. A total of 2,114 persons in the two panels do not link to either 2017 or 2018 NHIS data. These unlinked cases include newborns; newly in-scope persons; and a small number of cases where the NHIS identified a household as responding, but when fielded in MEPS it was determined to actually be a nonresponding household. Table 1 below summarizes the linkages.

Table 1 - Linkage File Record Counts

2019 MEPS Full-Year Data Linked to 2017 NHIS PUF(n = 78,132) Linked to 2018 NHIS PUF(n = 72,831) Linked to 2017 or 2018 NHIS PUF (n=150,963) Not Linked to NHIS Total 2019 MEPS Persons
Panel 23 persons 13,191 0 13,191 1,232 14,423
Panel 24 persons 0 13,207 13,207 882 14,089
Total 13,191 13,207 26,398 2,114 28,512


4.0Linkage File Record Layout

Table 2 is the record layout for the person-level MEPS/NHIS linkage file (NHMEP19X.DAT).

Variable Columns Type Label and value range
DUPERSID 1 - 10 Character MEPS encrypted person ID (range = 2320002101-2469689101)
HHX 11 - 16 Character NHIS household serial number (range = 000001-046803)
FMX 17 - 18 Character NHIS family number (range = 01 - 06 )
FPX 19 - 20 Character NHIS person number (range = 01 - 14)
LINKFLAG 21 - 21 Numeric Linkage status between MEPS and NHIS (1 or 0)
PANEL 22 - 23 Numeric MEPS panel number (either 23 or 24)
SRVY_YR 24 - 27 Numeric NHIS survey year (2017 or 2018)


Below is the input statement to convert the linkage file (NHMEP19X.DAT) to a SAS dataset.

DATA XX.NHMEP19X;
INFILE  “C:\TEMP\MEPS\NHMEP19X.DAT”;
INPUT  DUPERSID $1-10  HHX $11-16  FMX $17-18  FPX $19-20  LINKFLAG 21
PANEL 22-23  SRVY_YR 24-27;
RUN;


5.0Linking Instructions for SAS Users

The following is one way of adding NHIS person-level variables to the MEPS person-level file. Input files are: MEPS HC-212 (2019 Full Year Population Characteristics), 2017 NHIS person-level data file, 2018 NHIS person-level data file, and the linkage file NHMEP19X.DAT.

  1. Create four SAS datasets as follows:

    • Convert MEPS HC-212 (ASCII, SAS transport file, or SAS V9 file) to a SAS dataset named FY2019 (n = 28,512).

    • Convert the linkage file NHMEP19X.DAT to a SAS dataset named NHMEP19X (n = 28,512).

    • Convert the 2017 NHIS Person file to a SAS dataset named NHIS2017 (n = 78,132). Make sure the SAS dataset includes HHX, FMX, FPX, SRVY_YR, and other variables that are to be added to the MEPS full-year dataset.

    • Convert the 2018 NHIS Person file to a SAS dataset named NHIS2018 (n = 72,831). Make sure the SAS dataset includes HHX, FMX, FPX, SRVY_YR, and other variables that are to be added to the MEPS full-year dataset.

  2. Sort FY2019 by DUPERSID. Concatenate NHIS2017 and NHIS2018 into one dataset named NHISALL (n = 150,963). Sort NHISALL by HHX, FMX, FPX, and SRVY_YR.

  3. Merge FY2019 (n = 28,512) with NHMEP19X (n = 28,512) by DUPERSID. Name the output dataset MEPS (n = 28,512). Then sort MEPS by HHX, FMX, FPX, and SRVY_YR.

  4. Merge MEPS (n = 28,512) with NHISALL (n = 150,963) by HHX, FMX, FPX, and SRVY_YR. Keep records only in MEPS (n = 28,512). Name the output dataset MEPS19NH (n = 28,512).


Below is a sample SAS program for adding NHIS variables to the MEPS dataset.

LIBNAME MEPS "C:\TEMP\MEPS"; /*MEPS 2019 Full-Year PUF, MEPS-NHIS Link, output file*/
LIBNAME NHIS "C:\TEMP\NHIS"; /*NHIS 2017 and 2018 Person Files*/

PROC FORMAT;
VALUE AGE
.='.'
0-HIGH='>=0';
RUN;

DATA NHISALL;
SET NHIS.NHIS2017 (KEEP=HHX FMX FPX SRVY_YR AGE_P /*other NHIS variables*/)
NHIS.NHIS2018 (KEEP=HHX FMX FPX SRVY_YR AGE_P /*other NHIS variables*/);
RUN;

PROC SORT DATA=NHISALL;
BY HHX FMX FPX SRVY_YR;
RUN;

DATA MEPS;
MERGE MEPS.FY2019 MEPS.NHMEP19X (KEEP=DUPERSID HHX FMX FPX SRVY_YR LINKFLAG);
BY DUPERSID;
RUN;

PROC SORT DATA=MEPS;
BY HHX FMX FPX SRVY_YR;
RUN;

DATA MEPS.MEPS18NH;
MERGE MEPS (IN=A) NHISALL;
BY HHX FMX FPX SRVY_YR;
IF A;
RUN;

TITLE1 "MEPS 2019 FY data with NHIS variables";
PROC FREQ DATA=MEPS.MEPS19NH;
TABLES LINKFLAG*SRVY_YR*AGE_P/LIST MISSING;
FORMAT AGE_P AGE.;
RUN;


6.0Sample Stata Code for Adding NHIS Variables to the MEPS Dataset


log using stata19.log, replace

local meps c:\temp\meps
local nhis c:\temp\nhis

use ‘meps’/h212, clear
sort dupersid
save fy2019, replace

use ‘nhis’\nhis2017, clear
append using ‘nhis’\nhis2018
sort hhx fmx fpx srvy_yr
save nhisall, replace

use ‘meps’\nhmep19x, clear
sort dupersid
save link, replace

use fy2019
merge 1:1 dupersid using link
drop _merge
sort hhx fmx fpx srvy_yr
save meps, replace

merge m:1 hhx fmx fpx srvy_yr using nhisall
keep if _merge != 2 /*drop cases where a record was found in the NHIS PUFs but not in MEPS*/
keep dupersid hhx fmx fpx srvy_yr linkflag /*edit this line to add any other desired nhis variables*/
save ‘meps’/meps19nh, replace

describe
tab srvy_yr linkflag, missing


7.0Further Information

For any questions regarding the linkage file, please contact May Chu at 301‑427‑1653 or by email at May.Chu@ahrq.hhs.gov. MEPS public use data files can be downloaded free of charge from the MEPS website at https://meps.ahrq.gov. NHIS public use data files can be obtained by contacting NCHS by telephone (301‑458‑4636) or through their website, https://www.cdc.gov/nchs.


MEPS HOME . CONTACT MEPS . MEPS FAQ . MEPS SITE MAP . MEPS PRIVACY POLICY . ACCESSIBILITY . VIEWERS & PLAYERS . COPYRIGHT
Back to topGo back to top
Back to Top Go back to top

Connect With Us

Facebook Twitter You Tube LinkedIn

Sign up for Email Updates

To sign up for updates or to access your subscriber preferences, please enter your email address below.

Agency for Healthcare Research and Quality

5600 Fishers Lane
Rockville, MD 20857
Telephone: (301) 427-1364

  • Careers
  • Contact Us
  • Español
  • FAQs
  • Accessibility
  • Disclaimers
  • EEO
  • Electronic Policies
  • FOIA
  • HHS Digital Strategy
  • HHS Nondiscrimination Notice
  • Inspector General
  • Plain Writing Act
  • Privacy Policy
  • Viewers & Players
  • U.S. Department of Health & Human Services
  • The White House
  • USA.gov